package com.dc.refactoring._0_入门;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Test {

    public static void main(String[] args){

        Movie movie1 = new Movie("神父", Movie.REGULAR);
        Movie movie2 = new Movie("八佰", Movie.NEW_RELEASE);
        Movie movie3 = new Movie("火影忍者", Movie.CHILDRENS);

        Rental rental1 = new Rental().setMovie(movie1).setDaysRented(3);
        Rental rental2 = new Rental().setMovie(movie2).setDaysRented(3);
        Rental rental3 = new Rental().setMovie(movie3).setDaysRented(3);

        Customer customer = new Customer().setName("张三");
        customer.addRental(rental1);
        customer.addRental(rental2);
        customer.addRental(rental3);

        String statement = customer.statement();
        log.info(">> {}", statement);
    }
}
